﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="Itop.YHPC.index"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>首页</title>
    <link type="text/css" rel="stylesheet" href="css/main.css" />
    <link type="text/css" rel="stylesheet" href="css/menu.css" />
    <link rel="stylesheet" type="text/css" href="css/menu/menu.css" />
<link rel="stylesheet" type="text/css" href="js/ext-4.0.1/resources/css/ext-all.css"/>
    <script src="js/ext-4.0.1/bootstrap.js" type="text/javascript"></script>
     <link rel="stylesheet" type="text/css" href="admin/resources/admin.css"/>
<script src="css/menu/stuHover.js" type="text/javascript"></script>
    <script type="text/javascript">
    Ext.onReady(function(){
    getTaskCount();
    timeId=window.setInterval("getTaskCount()",10000);
       
                   });
                   
    function getTaskCount(){
         Ext.Ajax.request( {
                            url :'workflow/workflow_task_ajax.aspx',
                            method :'post',
                           
                            success : function(r,o) {
                            
                                var respText =  r.responseText.substring(0,r.responseText.indexOf('<++>'));
                                var arr = respText.split('|');
                                var taskindext,dwindext;
                                switch(arr[4])
                                       {
                                       case '100':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=100&text=二级单位隐患上报">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                        case '101':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=101&text=市级单位隐患上报">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                          case '102':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=102&text=二级单位预评估">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                          case '103':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=103&text=二级单位规划性审核">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                          case '104':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=104&text=二级单位领导审核">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                          case '105':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=105&text=部门评估">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                          case '106':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=106&text=部门审核">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                          case '107':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=107&text=规划性审核">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                          case '108':
                                         taskindext='<a  target="mainframe"  href="workflow/workflow.aspx?wfid=108&text=公司领导审核">待办任务<span style="color:red">[' + arr[0] + ']</span>项，</a>'
                                         break
                                     
                                       }
                                       switch (arr[5]) {
                                         
                                           case '102':
                                               dwindext = '<font style="color:#008080">本单位隐患任务<span style="color:red">[' + arr[3] + ']</span>项。</font>'
                                               break
                                           case '103':
                                               dwindext = '<font style="color:#008080">本单位隐患任务<span style="color:red">[' + arr[3] + ']</span>项。</font>'
                                               break
                                           case '104':
                                               dwindext = '<font style="color:#008080">本单位隐患任务<span style="color:red">[' + arr[3] + ']</span>项。</font>'
                                               break

                                       }
                               
                               // Ext.get('tmp').replace('<div id="tmp" style="padding:5 0 0 10px">待办任务<span style="color:red">['+arr[0]+']</span>项，待治理任务<span style="color:red">['+arr[1]+']</span>项，待验收任务<span style="color:red">['+arr[2]+']</span>项</div>');
                                document.getElementById('navRight').innerHTML =taskindext+ '<a href="workflow/workflow.aspx?wfid=200&text=治理"  target="mainframe">待治理任务<span style="color:red">[' + arr[1] + ']</span>项，</a><a href="workflow/workflow.aspx?wfid=201&text=验收"  target="mainframe">待验收任务<span style="color:red">[' + arr[2] + ']</span>项，</a>'+dwindext;
                            },
                            failure : function(d) {
        		               // alert(d);
                            }
                        });
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div id="container">
            <div id="top" class="topbanner"></div>
            <div id="nav1">
              <div id="navLeftL"></div>              <div id="navLeft">  		            <div class="leftbox" style="padding-top:5px;">>></div><div class="normal"><%=getDate()%></div><div class="normal"><%=GetUserName() %>，欢迎您！</div>              </div>              <div id="navMiddle"></div>              <div id="navRight" style="padding:5 0 0 10px"></div>              <div id="navRightR"></div>            </div>              <ul id="nav">
	                <li class="top"><a href="#1" class="top_link"><span class="down">隐患上报</span></a>
	                    <ul class="sub">
	                       <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=100&text=二级单位隐患上报">二级单位隐患上报</a></li>
			                <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=101&text=市级单位隐患上报">市级单位隐患上报</a></li>
	                    </ul>
	                </li>
	                <li class="top"><a href="#1"  class="top_link"><span class="down">预评估</span></a>
	                    <ul class="sub">
	                       <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=102&text=二级单位预评估">二级单位预评估</a></li>
			                <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=103&text=二级单位规划性审核">二级单位规划性审核</a></li>
			                <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=104&text=二级单位领导审核">二级单位领导审核</a></li>
	                    </ul>
	                </li>
	                <li class="top"><a href="#1" class="top_link"><span class="down">评估</span></a>
	                    <ul class="sub">
	                       <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=105&text=部门评估">部门评估</a></li>
			                <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=106&text=部门审核">部门审核</a></li>
			                <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=107&text=规划性审核">规划性审核</a></li>
			                <li><a  target="mainframe"  href="workflow/workflow.aspx?wfid=108&text=公司领导审核">公司领导审核</a></li>
	                    </ul>
	                </li>
	                <li class="top"><a href="workflow/workflow.aspx?wfid=200&text=治理"  target="mainframe"  class="top_link"><span>治理</span></a></li>
	                <li class="top"><a href="workflow/workflow.aspx?wfid=201&text=验收"  target="mainframe"  class="top_link"><span>验收</span></a></li>
	                <li class="top"><a href="#1"  class="top_link"><span class="down">奖励与考核</span></a>
	                    <ul class="sub">
	                       <li><a  target="mainframe"  href="reward/rewardManager.aspx">奖励</a></li>
			                <li><a  target="mainframe"  href="reward/checkManager.aspx">考核</a></li>
	                    </ul>
	                </li>
	                <li class="top"><a href="#1" id="products" class="top_link"><span class="down">查询统计</span></a>
		                <ul class="sub">
			                <li><a  target="mainframe"  href="search/searchandexport.aspx">查询</a></li>
			                <li><a  target="mainframe"  href="search/statistics.aspx">统计</a></li>
			                <li><a  target="mainframe"  href="workflow/nonyh.aspx">非隐患</a></li>
		                </ul></li>
	                <li class="top"><a href="admin/yhpcDictionaryManager.aspx"  target="mainframe"  class="top_link"><span>参数管理</span></a>
                    </li>
	                <li class="top"><a href="#4" id="services" class="top_link"><span class="down">权限管理</span></a>
		                <ul class="sub">
			                <li><a  target="mainframe"  href="admin/sysUserManager.aspx">用户管理</a></li>
			                <li><a  target="mainframe"  href="admin/yhpcOrgManager.aspx">单位管理</a></li>
			                <li><a  target="mainframe"  href="admin/sysgroupManager.aspx">组管理</a></li>
		                </ul>
	                </li>
	                <li class="top"><a  target="mainframe"  href="admin/changepwd.aspx" class="top_link"><span>修改密码</span></a></li>
	                <li class="top"><a   href="admin/LoginOut.aspx" class="top_link"><span>退出</span></a></li>    	         </ul>        <div id="middle">
            <iframe frameborder="0" class="middle" id="mainframe" name="mainframe" scrolling="auto" src="search/searchandexport.aspx" >
            </iframe>
        </div>
        <div id="footer">
        
        </div>            </div>
    </form>
</body>
</html>
